<html>
<head>
	<title></title>
</head>
<body>
	<div id='output'></div>
	<script type="text/javascript" src='/socket.io/socket.io.js'></script>
	<script type="text/javascript">
		(function () {
			var socket = io.connect('ws://localhost:8080'),
				output = document.getElementById('output');

			socket.on('connect', function () {
				socket.on('hello', function (msg) {
					output.innerHTML += '<div>Hello ' + msg + '</div>';
					socket.emit('helloback', 'the client');
				});
			});
		}());
	</script>
</body>
</html>